package edu.just.pet.entity;

public class AdopRecord {
    Integer id;
    Integer petId;
    String petName;
    Integer adopterId;
    String adopterName;
    String adopTime;

    Integer type;

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    // 第几页
    private Integer page;

    // 每页展示多少条
    private Integer limit;

    private Integer pageIndex;


    public Integer getPageIndex() {
        if(limit != null && page != null) {
            return (page - 1)* limit;
        }
        return pageIndex;
    }

    public Integer getPage() {
        return page;
    }

    public void setPage(Integer page) {
        this.page = page;
    }

    public Integer getLimit() {
        return limit;
    }

    public void setLimit(Integer limit) {
        this.limit = limit;
    }

    public void setPageIndex(Integer pageIndex) {
        this.pageIndex = pageIndex;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getPetId() {
        return petId;
    }

    public void setPetId(Integer petId) {
        this.petId = petId;
    }

    public String getPetName() {
        return petName;
    }

    public void setPetName(String petName) {
        this.petName = petName;
    }

    public Integer getAdopterId() {
        return adopterId;
    }

    public void setAdopterId(Integer adopterId) {
        this.adopterId = adopterId;
    }

    public String getAdopterName() {
        return adopterName;
    }

    public void setAdopterName(String adopterName) {
        this.adopterName = adopterName;
    }

    public String getAdopTime() {
        return adopTime;
    }

    public void setAdopTime(String adopTime) {
        this.adopTime = adopTime;
    }

    @Override
    public String toString() {
        return "AdopRecord{" +
                "id=" + id +
                "petId=" + petId +
                ", petName='" + petName + '\'' +
                ", adopterId=" + adopterId +
                ", adopterName='" + adopterName + '\'' +
                ", time='" + adopTime + '\'' +
                ", page=" + page +
                ", limit=" + limit +
                ", pageIndex=" + pageIndex +
                '}';
    }
}
